	package charts ;
	import charts.series.Element;
	import charts.series.bars.Outline;
	import string.Utils;
	
	class BarOutline extends BarBase {
		 var outline_color: Float;
		
		public function new ( json: Dynamic, group: Float ) {
			
			//
			// specific value for outline
			//
			var style : Dynamic<String> =
			{
				outline_color:	"#000000"
			};
			
			ObjectHelper.merge_2( json, style );
			
			super( json, group );
		}
		
		//
		// called from the base object
		//
		 override function get_element( index: Int, value: Dynamic ): Element {
			
			var default_style: Dynamic<String> = this.get_element_helper( value );
			
			if ( Reflect.hasField(default_style,'outline_color') )
				default_style.outline_color = style.outline_color;
			
			var _default_style : Dynamic<Float> = { outline_color : 0 };
			if(Std.is(default_style.outline_color,String)) // TODO - type conversion must happen beforehand...
				_default_style.outline_color = Utils.get_color( default_style.outline_color ); 
				
			return new Outline( index, _default_style, this.group );
		}
	}
